# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=nfpm
pkgver=2.16.0
pkgrel=0
pkgdesc="a simple apk, Deb and RPM packager without external dependencies"
url="https://nfpm.goreleaser.com/"
arch="all !riscv64"
license="MIT"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/goreleaser/nfpm/archive/v$pkgver.tar.gz"

export GOMODCACHE="$srcdir/go"
export GOFLAGS="$GOFLAGS -modcacherw"

build() {
	go build -ldflags "-s -w -X main.version=$pkgver" -v -o nfpm ./cmd/nfpm/main.go
}

check() {
	go test
}

package() {
	install -Dm0755 nfpm "$pkgdir/usr/bin/nfpm"
}

sha512sums="
de8e73329f5b16b7642201ad5d1d371c5b9676e21d432639c992f79a1b1285e6004d20ce8bbc1c6262c16b9b068444ad4d146fe3776266cbd4f42eae848d7534  nfpm-2.16.0.tar.gz
"
